package cate.common.table.item.rune.sheet;

import cate.common.table.ESheet;
import cate.common.table.item.rune.row.RuneBaseRow;
import easy.java.dev.note.NoteClass;

@NoteClass(value = "徽章基础表")
public class RuneBaseSheet extends ESheet<RuneBaseRow> {
    @Override
    public String getSheetName() {
        return "徽章基础";
    }

    @Override
    protected RuneBaseRow buildRow() {
        return new RuneBaseRow();
    }

    public int getLevelUpTimes(int quality, int tid) {
        return getList().stream().filter(e -> e.quality == quality && e.id <= tid).mapToInt(e -> e.skillLevelUp ? 1 : 0).sum();
    }
}
